package com.server.questionbank.snframe.domain.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;
import jakarta.ws.rs.DefaultValue;
import lombok.Data;

import java.util.List;

/**
 * @author Tu
 * 课程卡片实体
 */
@Data
public class CoursePage {

    /** 课程名 */
    @NotBlank(message = "课程名称不能为空")
    private String courseName;
    /** 课程封面 */
    @DefaultValue("/cours/a.jpg")
    private String coursePicPath;
    /** 课程简介 */
    @Size(max = 500, message = "描述不能超过500字")
    private String courseDescription;
    /** 授课教师 */
    private String teachName;

    /** 标签列表 */
    @NotEmpty(message = "至少需要一个标签")
    private List<Long> courseLables;

    @Override
    public String toString() {
        return "{" +
                "courseName='" + courseName + '\'' +
                ", coursePicPath='" + coursePicPath + '\'' +
                ", courseDescription='" + courseDescription + '\'' +
                ", teachName='" + teachName + '\'' +
                ",courseLables="+courseLables+"}";
    }
}
